Primitive Class Flow.Starfield
Represents a starfield in the sky.
Functions
Starfield(starCount) | Create a starfield object with only stars. |
Starfield(starCount, meteorCount, meteorSpawnDensity, meteorVel) | Create a starfield object with stars and meteors. |
Starfield:GetStarCount() | Get this starfield's number of stars. |
Starfield:GetMeteorCount() | Get this starfield's number of meteors. |
Starfield:GetMeteorSpawnDensity() | Get this starfield's meteor spawn density. |
Starfield:GetMeteorVelocity() | Get this starfield's meteor velocity. |
Starfield:GetStarsEnabled() | Get this starfield's stars enabled status. |
Starfield:GetMeteorsEnabled() | Get this starfield's meteors enabled status. |
Starfield:SetStarCount(count) | Set this starfield's number of stars. |
Starfield:SetMeteorCount(count) | Set this starfield's number of meteors. |
Starfield:SetMeteorSpawnDensity(density) | Set this starfield's meteor spawn density. |
Starfield:SetMeteorVelocity(velocity) | Set this starfield's meteor velocity. |
Functions
- Starfield(starCount)
-
Create a starfield object with only stars.
Parameters:
- starCount int Star count.
Returns:
-
Starfield
A new Starfield object.
- Starfield(starCount, meteorCount, meteorSpawnDensity, meteorVel)
-
Create a starfield object with stars and meteors.
Parameters:
- starCount int Star count. Max: 6000
- meteorCount int Meteor count. Max: 100
- meteorSpawnDensity int Meteor spawn density.
- meteorVel int Meteor velocity.
Returns:
-
Starfield
A new Starfield object.
- Starfield:GetStarCount()
-
Get this starfield's number of stars.
Returns:
-
int
Count.
- Starfield:GetMeteorCount()
-
Get this starfield's number of meteors.
Returns:
-
int
Count.
- Starfield:GetMeteorSpawnDensity()
-
Get this starfield's meteor spawn density.
Returns:
-
int
Spawn density.
- Starfield:GetMeteorVelocity()
-
Get this starfield's meteor velocity.
Returns:
-
float
Velocity.
- Starfield:GetStarsEnabled()
-
Get this starfield's stars enabled status.
Returns:
-
bool
Stars enabled status. true: enabled, false: disabled
- Starfield:GetMeteorsEnabled()
-
Get this starfield's meteors enabled status.
Returns:
-
bool
Meteors enabled status. true: enabled, false: disabled
- Starfield:SetStarCount(count)
-
Set this starfield's number of stars.
Parameters:
- count int New star count.
- Starfield:SetMeteorCount(count)
-
Set this starfield's number of meteors.
Parameters:
- count int New meteor count.
- Starfield:SetMeteorSpawnDensity(density)
-
Set this starfield's meteor spawn density.
Parameters:
- density int New meteor spawn density.
- Starfield:SetMeteorVelocity(velocity)
-
Set this starfield's meteor velocity.
Parameters:
- velocity float New meteor velocity.